<p id="title"><?php  echo $this->title; ?>  </p>
<form method="POST" name="boo">
<?php
$action = 'insert';
if (isset ( $this->objectData )) {
	$action = 'update';
}
?>
<input type="hidden" name="actiontype" value="<?php echo $action;?>"/>
<input type="hidden" name="Driver_id" id="driver_id" value="<?php echo $this->bind('id')?>">
<div class="elem">
<label for="driver_username"> Username </label>
<input type="text" name="Driver_username" id="driver_username" value="<?php echo $this->bind('username')?>">
</div>
<div class="elem">
<label for="driver_birthday"> Birthday </label>
<input type="text" name="Driver_birthday" id="driver_birthday" value="<?php echo $this->bind('birthday')?>">
</div>
<div class="elem">
<label for="driver_numberphone"> Phone number </label>
<input type="text" name="Driver_numberphone" id="driver_numberphone" value="<?php echo $this->bind('numberphone')?>">
</div>
<div class="elem">
<label for="driver_email"> Email </label>
<input type="text" name="Driver_email" id="driver_email" value="<?php echo $this->bind('email')?>">
</div>
<div class="elem">
<label for="driver_address"> Address </label>
<input type="text" name="Driver_address" id="driver_address" value="<?php echo $this->bind('address')?>">
</div>
<div class="elem">
<label for="driver_image"> Image </label>
<input type="text" name="Driver_image" id="driver_image" value="<?php echo $this->bind('image')?>">
</div>
<div class="elem">
<label for="driver_company"> Company </label>
<select name="Driver_company" id="driver_company">
				<?php		
					foreach ($this->relativeData as $entity) {
						if ($this->bind('company') == $entity['id'])
							echo '<option selected="selected" value="'.$entity['id'].'" >'.$entity['name'].'</option>';
						else
							echo '<option value="'.$entity['id'].'">'.$entity['name'].'</option>';
					}					
				?>
			</select>
</div>
	<?php if($action=='insert')
		echo '<input type="hidden" name="Driver_status" id="driver_status" value="1">';
	?>

	<button type="submit" onclick="document.boo.submit()" style="display: none;">Save</button>
</form>
